#pragma once
#include<stdio.h>

#define SIZE 4096//缓冲区大小
#define NONE_FLUSH (1<<1)//无自动刷新
#define LINE_FLUSH (1<<2)//行刷新
#define FULL_FLUSH (1<<3)//全刷新


typedef struct _myFILE
{
    //char inbuffer[];
    char outbuffer[SIZE];
    int pos;
    int cap;
    int flush_mode;
    int fileno;
}myFILE;

myFILE* my_fopen(const char* pathname,const char* mode);
int my_fwrite(myFILE* fp,const char* fs,int size);
//int my_fread();
void my_fflush(myFILE* fp);
void DebugPrint(myFILE* fp);
void my_fclose(myFILE* fp);